In [75]:
# Do not edit this cell

# course: 3654
# a: Project 1
# d: VT

S&P 500 Companies Pre/Post Covid

Team: Rich Homies (Group 29)

Name: Thejus Poruthikode Unnivelan PID: thejuspu

Name: Andrew Visocan PID: avisocan

We have neither given nor received unauthorized assistance on this assignment. See the course sylabus for details on the Honor Code policy. In particular, sharing lines of solution code is prohibited.

In [2]:
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
from sklearn import preprocessing
from datetime import datetime

companyFile = "S&P500_Companies.csv"
companies = pd.read_csv(companyFile)
companies.columns
Out[2]:
Index(['Ticker', 'Company', 'Sector', 'Industry'], dtype='object')

Objective

To organize the companies on the S&P 500 into groups that flourished or struggled in the times of Covid-19, based on OHLCV data (Open, High, Low, Close, Volume). companyFile is a file containing details on the 509 companies on the S&P500, including ticker symbol, company name, their sector, and their industry (individual industries make up sectors).

In [3]:
OHLCV = {}
for i in companies['Ticker']:
    temp = pd.read_csv("./DATA/" + i + ".csv")
    dates = temp['date']
    dateTimes = []
    for j in dates:
        dateTimes.append(datetime.strptime(j, '%Y-%m-%d'))
    temp['date'] = dateTimes
    temp.set_index('date', inplace=True)
    OHLCV[i] = temp
In [4]:
OHLCV['A'].columns
Out[4]:
Index(['Open', 'High', 'Low', 'Close', 'Volume'], dtype='object')

Normalization

This method normalizes the data. SKLearn's Preprocessing's MinMaxScaler allows you to scale s ndarray of values between a desired range (we used (0, 1) and that is the default) by using the max and min value within the ndarray.

Plus

We wanted all the output to open at the same number so we divided by the initial opening value, after adding 1 to the numerator and denomenator. The division makes values less than the opening value between 0 and 1 and the values greater than the opening value large. So we found the natural log of the division and to avoid accidentally finding the natural log of zero, we added 1 to the numberator and denominator in the division step.

We have decided to name this plus, because we don't know whether this step will provide any useful insight into our problem, or whether this will help us create a better solution. So this has been sprinkled on top.

In [71]:
# Pre-req: data = OHLCV[ticker].drop('date', axis=1).drop('Volume', axis=1)
# and/or
# Pre-req: data = OHLCV[ticker].Volume
def normalize(data):
    normaliser = preprocessing.MinMaxScaler()
    temp = data.values
    temp = normaliser.fit_transform(temp)
    # temp = (temp + .001) / (temp[0][0] + .001)
    # temp = np.log(temp)
    return temp

def normalizePlus(data):
    normaliser = preprocessing.MinMaxScaler()
    temp = data.values
    temp = normaliser.fit_transform(temp)
    temp = (temp + .001) / (temp[0][0] + .001)
    temp = np.log(temp)
    return temp

def normOHLCV(data):
    temp = normalize(data.drop('Volume', axis=1))
    temp = pd.DataFrame(data=temp, columns=['Open', 'High', 'Low', 'Close'], index = data.index)
    temp['Volume'] = data['Volume']
    return temp

def normOHLCVplus(data):
    temp = normalizePlus(data.drop('Volume', axis=1))
    temp = pd.DataFrame(data=temp, columns=['Open', 'High', 'Low', 'Close'], index = data.index)
    temp['Volume'] = data['Volume']
    return temp

Normalization Pre-, Post-Covid and Crash (Pre Crash Post (PCP))

normPCP is a dictionary, key'd by the Ticker symbol, containing the set of three OHLCV data within the time frames and normalizes OHLC and Volume within those time frames.

Time Frames:

Pre-Covid: [start, preCrashHigh]

Crash: [preGrashHigh, postCrashLow]

Post-Covid: [postCrashLow, end]

In [72]:
crash = datetime(2020, 2, 20)
start = datetime(2019, 8, 20)
end = datetime(2020, 8, 20)
preCrashHigh = datetime(2020, 2, 20)
postCrashLow = datetime(2020, 3, 23)
In [73]:
normPCP = {}
for i in companies['Ticker']:
    data = OHLCV[i]
    pre = data.loc[:preCrashHigh, :]
    crash = OHLCV[i].loc[preCrashHigh:postCrashLow, :]
    post = OHLCV[i].loc[postCrashLow:, :]
    if (pre.shape[0] != 0):
        normPCP[i] = (normOHLCV(pre), normOHLCV(crash), normOHLCV(post))
In [74]:
normPCPplus = {}
for i in companies['Ticker']:
    data = OHLCV[i]
    pre = data.loc[:preCrashHigh, :]
    crash = OHLCV[i].loc[preCrashHigh:postCrashLow, :]
    post = OHLCV[i].loc[postCrashLow:, :]
    if (pre.shape[0] != 0):
        normPCPplus[i] = (normOHLCVplus(pre), normOHLCVplus(crash), normOHLCVplus(post))
In [75]:
print('Removed ' + str(len(OHLCV.keys()) - len(normPCP.keys())) + ' Companies for not containing long enough information' )
Removed 2 Companies for not containing long enough information
In [76]:
preNorm = pd.DataFrame()
crashNorm = pd.DataFrame()
postNorm = pd.DataFrame()
for i in normPCP.keys():
    setPCP = normPCP[i]
    preNorm[i] = setPCP[0].Open
    crashNorm[i] = setPCP[1].Open
    postNorm[i] = setPCP[2].Open
preNorm['date'] = setPCP[0].index
preNorm.set_index('date', inplace=True)
crashNorm['date'] = setPCP[1].index
crashNorm.set_index('date', inplace=True)
postNorm['date'] = setPCP[2].index
postNorm.set_index('date', inplace=True)
In [77]:
preNormPlus = pd.DataFrame()
crashNormPlus = pd.DataFrame()
postNormPlus = pd.DataFrame()
for i in normPCPplus.keys():
    setPCP = normPCPplus[i]
    preNormPlus[i] = setPCP[0].Open
    crashNormPlus[i] = setPCP[1].Open
    postNormPlus[i] = setPCP[2].Open
preNormPlus['date'] = setPCP[0].index
preNormPlus.set_index('date', inplace=True)
crashNormPlus['date'] = setPCP[1].index
crashNormPlus.set_index('date', inplace=True)
postNormPlus['date'] = setPCP[2].index
postNormPlus.set_index('date', inplace=True)
In [78]:
for i in set(companies['Sector']):
    print('\t\t\t', '\033[1m' + i + '\033[0m')
    sector = companies[companies['Sector'] == i]
    for j in set(sector['Industry']):
        print(j)
        industry = sector[sector['Industry'] == j]
        fig, ((preAx, preAxPlus), (crashAx, crashAxPlus), (postAx, postAxPlus)) = plt.subplots(nrows=3, ncols=2, figsize=(15,15))
        tickers = []
        for k in industry.index:
            ticker = industry.loc[k, 'Ticker']
            if ticker in normPCP.keys():
                print(ticker, ':\t', industry.loc[k, 'Company'])
                tickers.append(ticker)
        # fig.suptitle('Industry ' + j)
        preAx.set_title('Pre-Covid')
        crashAx.set_title('Covid Crash')
        postAx.set_title('Post-Covid')
        preAxPlus.set_title('Pre-Covid Plus')
        crashAxPlus.set_title('Covid Crash Plus')
        postAxPlus.set_title('Post-Covid Plus')
        
        # fig.subplots_adjust(hspace = 0.3)
        for i in tickers:
            preNorm[i].plot(y=tickers, ax=preAx)
            crashNorm[i].plot(y=tickers, ax=crashAx)
            postNorm[i].plot(y=tickers, ax=postAx)
            preNormPlus[i].plot(y=tickers, ax=preAxPlus)
            crashNormPlus[i].plot(y=tickers, ax=crashAxPlus)
            postNormPlus[i].plot(y=tickers, ax=postAxPlus)
        plt.show()
        print()
    print()
			 Utilities
Utilities - Regulated Electric
AEE :	 Ameren Corporation
AEP :	 American Electric Power Company, Inc.
CMS :	 CMS Energy Corporation
DTE :	 DTE Energy Company
DUK :	 Duke Energy Corporation
ED :	 Consolidated Edison, Inc.
EIX :	 Edison International
ES :	 Eversource Energy
EVRG :	 Evergy, Inc.
LNT :	 Alliant Energy Corporation
NEE :	 NextEra Energy, Inc.
PNW :	 Pinnacle West Capital Corporation
PPL :	 PPL Corporation
SO :	 The Southern Company
WEC :	 WEC Energy Group, Inc.
XEL :	 Xcel Energy Inc.
Utilities - Diversified
AES :	 The AES Corporation
D :	 Dominion Energy, Inc.
ETR :	 Entergy Corporation
EXC :	 Exelon Corporation
FE :	 FirstEnergy Corp.
PEG :	 Public Service Enterprise Group Incorporated
SRE :	 Sempra Energy
Utilities - Regulated Gas
ATO :	 Atmos Energy Corporation
CNP :	 CenterPoint Energy, Inc.
NI :	 NiSource Inc.
Utilities - Regulated Water
AWK :	 American Water Works Company, Inc.
Utilities - Independent Power Producers
NRG :	 NRG Energy, Inc.

			 Consumer Cyclical
Travel Services
BKNG :	 Booking Holdings Inc.
CCL :	 Carnival Corporation & Plc
EXPE :	 Expedia Group, Inc.
NCLH :	 Norwegian Cruise Line Holdings Ltd.
RCL :	 Royal Caribbean Cruises Ltd.
Leisure
HAS :	 Hasbro, Inc.
Personal Services
HRB :	 H&R Block, Inc.
ROL :	 Rollins, Inc.
Specialty Retail
AAP :	 Advance Auto Parts, Inc.
AZO :	 AutoZone, Inc.
BBY :	 Best Buy Co., Inc.
GPC :	 Genuine Parts Company
ORLY :	 O'Reilly Automotive, Inc.
TSCO :	 Tractor Supply Company
ULTA :	 Ulta Beauty, Inc.
Internet Retail
AMZN :	 Amazon.com, Inc.
EBAY :	 eBay Inc.
Resorts & Casinos
LVS :	 Las Vegas Sands Corp.
MGM :	 MGM Resorts International
WYNN :	 Wynn Resorts, Limited
Auto Manufacturers
F :	 Ford Motor Company
GM :	 General Motors Company
Apparel Retail
GPS :	 The Gap, Inc.
LB :	 L Brands, Inc.
ROST :	 Ross Stores, Inc.
TJX :	 The TJX Companies, Inc.
Apparel Manufacturing
HBI :	 Hanesbrands Inc.
PVH :	 PVH Corp.
RL :	 Ralph Lauren Corporation
UA :	 Under Armour, Inc.
UAA :	 Under Armour, Inc.
VFC :	 V.F. Corporation
Residential Construction
DHI :	 D.R. Horton, Inc.
LEN :	 Lennar Corporation
NVR :	 NVR, Inc.
PHM :	 PulteGroup, Inc.
Packaging & Containers
AMCR :	 Amcor plc
BLL :	 Ball Corporation
IP :	 International Paper Company
PKG :	 Packaging Corporation of America
SEE :	 Sealed Air Corporation
WRK :	 WestRock Company
Lodging
HLT :	 Hilton Worldwide Holdings Inc.
MAR :	 Marriott International, Inc.
Footwear & Accessories
NKE :	 NIKE, Inc.
Home Improvement Retail
HD :	 The Home Depot, Inc.
LOW :	 Lowe's Companies, Inc.
Luxury Goods
TIF :	 Tiffany & Co.
TPR :	 Tapestry, Inc.
Department Stores
KSS :	 Kohl's Corporation
Auto Parts
APTV :	 Aptiv PLC
BWA :	 BorgWarner Inc.
LKQ :	 LKQ Corporation
Restaurants
CMG :	 Chipotle Mexican Grill, Inc.
DPZ :	 Domino's Pizza, Inc.
DRI :	 Darden Restaurants, Inc.
MCD :	 McDonald's Corporation
SBUX :	 Starbucks Corporation
YUM :	 Yum! Brands, Inc.
Auto & Truck Dealerships
KMX :	 CarMax, Inc.
Furnishings, Fixtures & Appliances
FBHS :	 Fortune Brands Home & Security, Inc.
LEG :	 Leggett & Platt, Incorporated
MHK :	 Mohawk Industries, Inc.
WHR :	 Whirlpool Corporation

			 Financial
Asset Management
AMP :	 Ameriprise Financial, Inc.
BEN :	 Franklin Resources, Inc.
BK :	 The Bank of New York Mellon Corporation
BLK :	 BlackRock, Inc.
IVZ :	 Invesco Ltd.
NTRS :	 Northern Trust Corporation
STT :	 State Street Corporation
TROW :	 T. Rowe Price Group, Inc.
Insurance - Property & Casualty
ALL :	 The Allstate Corporation
CB :	 Chubb Limited
CINF :	 Cincinnati Financial Corporation
L :	 Loews Corporation
PGR :	 The Progressive Corporation
TRV :	 The Travelers Companies, Inc.
WRB :	 W. R. Berkley Corporation
Banks - Regional
CFG :	 Citizens Financial Group, Inc.
CMA :	 Comerica Incorporated
FITB :	 Fifth Third Bancorp
FRC :	 First Republic Bank
HBAN :	 Huntington Bancshares Incorporated
KEY :	 KeyCorp
MTB :	 M&T Bank Corporation
PBCT :	 People's United Financial, Inc.
PNC :	 The PNC Financial Services Group, Inc.
RF :	 Regions Financial Corporation
SIVB :	 SVB Financial Group
TFC :	 Truist Financial Corporation
USB :	 U.S. Bancorp
ZION :	 Zions Bancorporation, National Association
Banks - Diversified
BAC :	 Bank of America Corporation
C :	 Citigroup Inc.
JPM :	 JPMorgan Chase & Co.
WFC :	 Wells Fargo & Company
Insurance Brokers
AJG :	 Arthur J. Gallagher & Co.
AON :	 Aon Plc
MMC :	 Marsh & McLennan Companies, Inc.
WLTW :	 Willis Towers Watson Public Limited Company
Credit Services
AXP :	 American Express Company
COF :	 Capital One Financial Corporation
DFS :	 Discover Financial Services
MA :	 Mastercard Incorporated
PYPL :	 PayPal Holdings, Inc.
SYF :	 Synchrony Financial
V :	 Visa Inc.
WU :	 The Western Union Company
Insurance - Specialty
AIZ :	 Assurant, Inc.
Insurance - Life
AFL :	 Aflac Incorporated
GL :	 Globe Life Inc.
LNC :	 Lincoln National Corporation
MET :	 MetLife, Inc.
PRU :	 Prudential Financial, Inc.
UNM :	 Unum Group
Capital Markets
ETFC :	 E*TRADE Financial Corporation
GS :	 The Goldman Sachs Group, Inc.
MKTX :	 MarketAxess Holdings Inc.
MS :	 Morgan Stanley
RJF :	 Raymond James Financial, Inc.
SCHW :	 The Charles Schwab Corporation
Financial Data & Stock Exchanges
CBOE :	 Cboe Global Markets, Inc.
CME :	 CME Group Inc.
ICE :	 Intercontinental Exchange, Inc.
MCO :	 Moody's Corporation
MSCI :	 MSCI Inc.
NDAQ :	 Nasdaq, Inc.
SPGI :	 S&P Global Inc.
Insurance - Reinsurance
RE :	 Everest Re Group, Ltd.
Insurance - Diversified
AIG :	 American International Group, Inc.
BRK-B :	 Berkshire Hathaway Inc.
HIG :	 The Hartford Financial Services Group, Inc.
PFG :	 Principal Financial Group, Inc.

			 Real Estate
REIT - Residential
AIV :	 Apartment Investment and Management Company
AVB :	 AvalonBay Communities, Inc.
EQR :	 Equity Residential
ESS :	 Essex Property Trust, Inc.
MAA :	 Mid-America Apartment Communities, Inc.
UDR :	 UDR, Inc.
REIT - Retail
FRT :	 Federal Realty Investment Trust
KIM :	 Kimco Realty Corporation
O :	 Realty Income Corporation
REG :	 Regency Centers Corporation
SPG :	 Simon Property Group, Inc.
REIT - Hotel & Motel
HST :	 Host Hotels & Resorts, Inc.
REIT - Specialty
AMT :	 American Tower Corporation (REIT)
CCI :	 Crown Castle International Corp. (REIT)
EQIX :	 Equinix, Inc. (REIT)
IRM :	 Iron Mountain Incorporated
SBAC :	 SBA Communications Corporation (REIT)
WY :	 Weyerhaeuser Company
Real Estate Services
CBRE :	 CBRE Group, Inc.
REIT - Healthcare Facilities
PEAK :	 Healthpeak Properties, Inc.
VTR :	 Ventas, Inc.
WELL :	 Welltower Inc.
REIT - Office
ARE :	 Alexandria Real Estate Equities, Inc.
BXP :	 Boston Properties, Inc.
DLR :	 Digital Realty Trust, Inc.
SLG :	 SL Green Realty Corp.
VNO :	 Vornado Realty Trust
REIT - Industrial
DRE :	 Duke Realty Corporation
EXR :	 Extra Space Storage Inc.
PLD :	 Prologis, Inc.
PSA :	 Public Storage

			 Industrials
Specialty Industrial Machinery
AME :	 AMETEK, Inc.
AOS :	 A. O. Smith Corporation
CMI :	 Cummins Inc.
DOV :	 Dover Corporation
EMR :	 Emerson Electric Co.
ETN :	 Eaton Corporation plc
FLS :	 Flowserve Corporation
GE :	 General Electric Company
HON :	 Honeywell International Inc.
HWM :	 Howmet Aerospace Inc.
IEX :	 IDEX Corporation
IR :	 Ingersoll Rand Inc.
ITW :	 Illinois Tool Works Inc.
MMM :	 3M Company
PH :	 Parker-Hannifin Corporation
PNR :	 Pentair plc
ROK :	 Rockwell Automation, Inc.
ROP :	 Roper Technologies, Inc.
TT :	 Trane Technologies plc
XYL :	 Xylem Inc.
Aerospace & Defense
BA :	 The Boeing Company
GD :	 General Dynamics Corporation
HII :	 Huntington Ingalls Industries, Inc.
LHX :	 L3Harris Technologies, Inc.
LMT :	 Lockheed Martin Corporation
NOC :	 Northrop Grumman Corporation
RTX :	 Raytheon Technologies Corporation
TDG :	 TransDigm Group Incorporated
TXT :	 Textron Inc.
Engineering & Construction
J :	 Jacobs Engineering Group Inc.
JCI :	 Johnson Controls International plc
PWR :	 Quanta Services, Inc.
Tools & Accessories
SNA :	 Snap-on Incorporated
SWK :	 Stanley Black & Decker, Inc.
Building Products & Equipment
MAS :	 Masco Corporation
Integrated Freight & Logistics
CHRW :	 C.H. Robinson Worldwide, Inc.
EXPD :	 Expeditors International of Washington, Inc.
FDX :	 FedEx Corporation
JBHT :	 J.B. Hunt Transport Services, Inc.
UPS :	 United Parcel Service, Inc.
Railroads
CSX :	 CSX Corporation
KSU :	 Kansas City Southern
NSC :	 Norfolk Southern Corporation
UNP :	 Union Pacific Corporation
WAB :	 Wabtec Corporation
Farm & Heavy Construction Machinery
CAT :	 Caterpillar Inc.
DE :	 Deere & Company
PCAR :	 PACCAR Inc
Industrial Distribution
FAST :	 Fastenal Company
GWW :	 W.W. Grainger, Inc.
Trucking
ODFL :	 Old Dominion Freight Line, Inc.
Consulting Services
EFX :	 Equifax Inc.
INFO :	 IHS Markit Ltd.
NLSN :	 Nielsen Holdings plc
VRSK :	 Verisk Analytics, Inc.
Rental & Leasing Services
URI :	 United Rentals, Inc.
Business Equipment & Supplies
AVY :	 Avery Dennison Corporation
Airlines
AAL :	 American Airlines Group Inc.
ALK :	 Alaska Air Group, Inc.
DAL :	 Delta Air Lines, Inc.
LUV :	 Southwest Airlines Co.
UAL :	 United Airlines Holdings, Inc.
Specialty Business Services
CPRT :	 Copart, Inc.
CTAS :	 Cintas Corporation
GPN :	 Global Payments Inc.
Staffing & Employment Services
ADP :	 Automatic Data Processing, Inc.
PAYX :	 Paychex, Inc.
RHI :	 Robert Half International Inc.
Waste Management
RSG :	 Republic Services, Inc.
WM :	 Waste Management, Inc.
Security & Protection Services
ALLE :	 Allegion plc

			 Healthcare
Biotechnology
ALXN :	 Alexion Pharmaceuticals, Inc.
INCY :	 Incyte Corporation
REGN :	 Regeneron Pharmaceuticals, Inc.
VRTX :	 Vertex Pharmaceuticals Incorporated
Drug Manufacturers - Specialty & Generic
MYL :	 Mylan, Inc.
PRGO :	 Perrigo Company plc
ZTS :	 Zoetis Inc.
Medical Instruments & Supplies
BAX :	 Baxter International Inc.
BDX :	 Becton, Dickinson and Company
COO :	 The Cooper Companies, Inc.
HOLX :	 Hologic, Inc.
ISRG :	 Intuitive Surgical, Inc.
RMD :	 ResMed Inc.
STE :	 STERIS plc
TFX :	 Teleflex Incorporated
VAR :	 Varian Medical Systems, Inc.
WST :	 West Pharmaceutical Services, Inc.
XRAY :	 DENTSPLY SIRONA Inc.
Health Information Services
CERN :	 Cerner Corporation
Medical Care Facilities
DVA :	 DaVita Inc.
HCA :	 HCA Healthcare, Inc.
UHS :	 Universal Health Services, Inc.
Drug Manufacturers - General
ABBV :	 AbbVie Inc.
AMGN :	 Amgen Inc.
BIIB :	 Biogen Inc.
BMY :	 Bristol-Myers Squibb Company
GILD :	 Gilead Sciences, Inc.
JNJ :	 Johnson & Johnson
LLY :	 Eli Lilly and Company
MRK :	 Merck & Co., Inc.
PFE :	 Pfizer Inc.
Medical Distribution
ABC :	 AmerisourceBergen Corporation
CAH :	 Cardinal Health, Inc.
HSIC :	 Henry Schein, Inc.
MCK :	 McKesson Corporation
Healthcare Plans
ANTM :	 Anthem, Inc.
CI :	 Cigna Corporation
CNC :	 Centene Corporation
CVS :	 CVS Health Corporation
HUM :	 Humana Inc.
UNH :	 UnitedHealth Group Incorporated
Pharmaceutical Retailers
WBA :	 Walgreens Boots Alliance, Inc.
Medical Devices
ABMD :	 Abiomed, Inc.
ABT :	 Abbott Laboratories
ALGN :	 Align Technology, Inc.
BIO :	 Bio-Rad Laboratories, Inc.
BSX :	 Boston Scientific Corporation
EW :	 Edwards Lifesciences Corporation
MDT :	 Medtronic plc
SYK :	 Stryker Corporation
ZBH :	 Zimmer Biomet Holdings, Inc.
Diagnostics & Research
A :	 Agilent Technologies, Inc.
DGX :	 Quest Diagnostics Incorporated
DHR :	 Danaher Corporation
DXCM :	 DexCom, Inc.
IDXX :	 IDEXX Laboratories, Inc.
ILMN :	 Illumina, Inc.
IQV :	 IQVIA Holdings Inc.
LH :	 Laboratory Corporation of America Holdings
MTD :	 Mettler-Toledo International Inc.
PKI :	 PerkinElmer, Inc.
TMO :	 Thermo Fisher Scientific Inc.
WAT :	 Waters Corporation

			 Basic Materials
Chemicals
APD :	 Air Products and Chemicals, Inc.
CE :	 Celanese Corporation
DD :	 DuPont de Nemours, Inc.
DOW :	 Dow Inc.
EMN :	 Eastman Chemical Company
Gold
NEM :	 Newmont Corporation
Steel
NUE :	 Nucor Corporation
Agricultural Inputs
CF :	 CF Industries Holdings, Inc.
CTVA :	 Corteva, Inc.
FMC :	 FMC Corporation
MOS :	 The Mosaic Company
Specialty Chemicals
ALB :	 Albemarle Corporation
ECL :	 Ecolab Inc.
IFF :	 International Flavors & Fragrances Inc.
LIN :	 Linde plc
LYB :	 LyondellBasell Industries N.V.
PPG :	 PPG Industries, Inc.
SHW :	 The Sherwin-Williams Company
Building Materials
MLM :	 Martin Marietta Materials, Inc.
VMC :	 Vulcan Materials Company
Copper
FCX :	 Freeport-McMoRan Inc.

			 Technology
Scientific & Technical Instruments
FLIR :	 FLIR Systems, Inc.
FTV :	 Fortive Corporation
GRMN :	 Garmin Ltd.
KEYS :	 Keysight Technologies, Inc.
TDY :	 Teledyne Technologies Incorporated
Semiconductors
ADI :	 Analog Devices, Inc.
AMD :	 Advanced Micro Devices, Inc.
AVGO :	 Broadcom Inc.
INTC :	 Intel Corporation
MCHP :	 Microchip Technology Incorporated
MU :	 Micron Technology, Inc.
MXIM :	 Maxim Integrated Products, Inc.
NVDA :	 NVIDIA Corporation
QCOM :	 QUALCOMM Incorporated
QRVO :	 Qorvo, Inc.
SWKS :	 Skyworks Solutions, Inc.
TXN :	 Texas Instruments Incorporated
XLNX :	 Xilinx, Inc.
Software - Application
ADSK :	 Autodesk, Inc.
ANSS :	 ANSYS, Inc.
CDNS :	 Cadence Design Systems, Inc.
CRM :	 salesforce.com, inc.
CTXS :	 Citrix Systems, Inc.
INTU :	 Intuit Inc.
NOW :	 ServiceNow, Inc.
PAYC :	 Paycom Software, Inc.
TYL :	 Tyler Technologies, Inc.
Information Technology Services
ACN :	 Accenture plc
BR :	 Broadridge Financial Solutions, Inc.
CDW :	 CDW Corporation
CTSH :	 Cognizant Technology Solutions Corporation
DXC :	 DXC Technology Company
FIS :	 Fidelity National Information Services, Inc.
FISV :	 Fiserv, Inc.
FLT :	 FLEETCOR Technologies, Inc.
IBM :	 International Business Machines Corporation
IT :	 Gartner, Inc.
JKHY :	 Jack Henry & Associates, Inc.
LDOS :	 Leidos Holdings, Inc.
XRX :	 Xerox Holdings Corporation
Computer Hardware
ANET :	 Arista Networks, Inc.
HPQ :	 HP Inc.
NTAP :	 NetApp, Inc.
STX :	 Seagate Technology plc
WDC :	 Western Digital Corporation
Electronic Components
APH :	 Amphenol Corporation
GLW :	 Corning Incorporated
TEL :	 TE Connectivity Ltd.
Communication Equipment
CSCO :	 Cisco Systems, Inc.
HPE :	 Hewlett Packard Enterprise Company
JNPR :	 Juniper Networks, Inc.
MSI :	 Motorola Solutions, Inc.
ZBRA :	 Zebra Technologies Corporation
Semiconductor Equipment & Materials
AMAT :	 Applied Materials, Inc.
IPGP :	 IPG Photonics Corporation
KLAC :	 KLA Corporation
LRCX :	 Lam Research Corporation
Software - Infrastructure
ADBE :	 Adobe Inc.
AKAM :	 Akamai Technologies, Inc.
FFIV :	 F5 Networks, Inc.
FTNT :	 Fortinet, Inc.
MSFT :	 Microsoft Corporation
NLOK :	 NortonLifeLock Inc.
ORCL :	 Oracle Corporation
SNPS :	 Synopsys, Inc.
VRSN :	 VeriSign, Inc.
Consumer Electronics
AAPL :	 Apple Inc.

			 Communication Services
Internet Content & Information
FB :	 Facebook, Inc.
GOOG :	 Alphabet Inc.
GOOGL :	 Alphabet Inc.
TWTR :	 Twitter, Inc.
Electronic Gaming & Multimedia
ATVI :	 Activision Blizzard, Inc.
EA :	 Electronic Arts Inc.
TTWO :	 Take-Two Interactive Software, Inc.
Entertainment
CHTR :	 Charter Communications, Inc.
CMCSA :	 Comcast Corporation
DIS :	 The Walt Disney Company
DISCA :	 Discovery, Inc.
DISCK :	 Discovery, Inc.
DISH :	 DISH Network Corporation
LYV :	 Live Nation Entertainment, Inc.
NFLX :	 Netflix, Inc.
VIAC :	 ViacomCBS Inc.
Broadcasting
FOX :	 Fox Corporation
FOXA :	 Fox Corporation
NWS :	 News Corporation
NWSA :	 News Corporation
Telecom Services
CTL :	 CenturyLink, Inc.
T :	 AT&T Inc.
TMUS :	 T-Mobile US, Inc.
VZ :	 Verizon Communications Inc.
Advertising Agencies
IPG :	 The Interpublic Group of Companies, Inc.
OMC :	 Omnicom Group Inc.

			 Energy
Oil & Gas Midstream
KMI :	 Kinder Morgan, Inc.
OKE :	 ONEOK, Inc.
WMB :	 The Williams Companies, Inc.
Oil & Gas E&P
APA :	 Apache Corporation
COG :	 Cabot Oil & Gas Corporation
COP :	 ConocoPhillips
CXO :	 Concho Resources Inc.
DVN :	 Devon Energy Corporation
EOG :	 EOG Resources, Inc.
FANG :	 Diamondback Energy, Inc.
HES :	 Hess Corporation
MRO :	 Marathon Oil Corporation
NBL :	 Noble Energy, Inc.
OXY :	 Occidental Petroleum Corporation
PXD :	 Pioneer Natural Resources Company
Oil & Gas Integrated
CVX :	 Chevron Corporation
XOM :	 Exxon Mobil Corporation
Oil & Gas Equipment & Services
BKR :	 Baker Hughes Company
FTI :	 TechnipFMC plc
HAL :	 Halliburton Company
NOV :	 National Oilwell Varco, Inc.
SLB :	 Schlumberger Limited
Oil & Gas Refining & Marketing
HFC :	 HollyFrontier Corporation
MPC :	 Marathon Petroleum Corporation
PSX :	 Phillips 66
VLO :	 Valero Energy Corporation

			 Consumer Defensive
Grocery Stores
KR :	 The Kroger Co.
Beverages - Wineries & Distilleries
BF-B :	 Brown-Forman Corporation
STZ :	 Constellation Brands, Inc.
Farm Products
ADM :	 Archer-Daniels-Midland Company
TSN :	 Tyson Foods, Inc.
Beverages - Non-Alcoholic
KO :	 The Coca-Cola Company
MNST :	 Monster Beverage Corporation
PEP :	 PepsiCo, Inc.
Food Distribution
SYY :	 Sysco Corporation
Household & Personal Products
CHD :	 Church & Dwight Co., Inc.
CL :	 Colgate-Palmolive Company
CLX :	 The Clorox Company
COTY :	 Coty Inc.
EL :	 The Estee Lauder Companies Inc.
KMB :	 Kimberly-Clark Corporation
NWL :	 Newell Brands Inc.
PG :	 The Procter & Gamble Company
Confectioners
HSY :	 The Hershey Company
MDLZ :	 Mondelez International, Inc.
Packaged Foods
CAG :	 Conagra Brands, Inc.
CPB :	 Campbell Soup Company
GIS :	 General Mills, Inc.
HRL :	 Hormel Foods Corporation
K :	 Kellogg Company
KHC :	 The Kraft Heinz Company
LW :	 Lamb Weston Holdings, Inc.
MKC :	 McCormick & Company, Incorporated
SJM :	 The J. M. Smucker Company
Beverages - Brewers
TAP :	 Molson Coors Beverage Company
Tobacco
MO :	 Altria Group, Inc.
PM :	 Philip Morris International Inc.
Discount Stores
COST :	 Costco Wholesale Corporation
DG :	 Dollar General Corporation
DLTR :	 Dollar Tree, Inc.
TGT :	 Target Corporation
WMT :	 Walmart Inc.

Insights

From these graphs we have given us a deeper understanding of how the market works and how we want to analyze the market for our problem. We analyzed these graphs by industry because the industries are an inbuilt clustering method, that allows us to gain insight into markets with high competition and markets that all respond simultaneously to external factors. There are a two key take-aways from these graphs

  1. The Peak before the crash and the trough after the crash is different for each ticker. Because we used the dates for the peak and trough from the S&P 500, we couldn't see that until we created these graphs. For the Plus version of the normalization, this fact makes a big difference because the initial normalization is divided by the initial data point, and that can be exorbitantly low or high.

  2. The Plus version doesn't seem to gleam much insight except for making market certainty and uncertainty very apparent. However, once 1. is addrssed the plus version may give improved insights into the market conditions. Another solution to this problem could be to divide by every since data-point in the time-series, which would technically end up analyzing every data point to every other datapoint which could become beneficial information-wise, but computationally costly.

But at the end of it all, the normalization of the market opens alone doesn't seem to provide enough information to make clean insights. The normal normalization doesn't provide insights into how some tickers outperform competitors week-to-week, day-to-day, or month-to-month because all the data is stuck between 0 and 1. On the other hand Normalization Plus seems promise a lot, and is now asking for more for those same promises. Feels a lot like corruption.

A good idea worth investing into is analyzing the day to day difference in opening values, or the daily difference is highs and lows and making them positives and negatives depending on the relativity of the opening and closing values.

Appendix

Companies by Sector & Industry

In [82]:
print(len(set(companies['Sector'])), 'Sectors Total')
for i in set(companies['Sector']):
    sector = companies[companies['Sector'] == i]
    print(len(set(sector['Industry'])), '\t', '\033[1m' + i + '\033[0m')
    sector = companies[companies['Sector'] == i]
    for j in set(sector['Industry']):
        print(j)
    print()
11 Sectors Total
5 	 Utilities
Utilities - Regulated Electric
Utilities - Diversified
Utilities - Regulated Gas
Utilities - Regulated Water
Utilities - Independent Power Producers

20 	 Consumer Cyclical
Travel Services
Leisure
Personal Services
Specialty Retail
Internet Retail
Resorts & Casinos
Auto Manufacturers
Apparel Retail
Apparel Manufacturing
Residential Construction
Packaging & Containers
Lodging
Footwear & Accessories
Home Improvement Retail
Luxury Goods
Department Stores
Auto Parts
Restaurants
Auto & Truck Dealerships
Furnishings, Fixtures & Appliances

12 	 Financial
Asset Management
Insurance - Property & Casualty
Banks - Regional
Banks - Diversified
Insurance Brokers
Credit Services
Insurance - Specialty
Insurance - Life
Capital Markets
Financial Data & Stock Exchanges
Insurance - Reinsurance
Insurance - Diversified

8 	 Real Estate
REIT - Residential
REIT - Retail
REIT - Hotel & Motel
REIT - Specialty
Real Estate Services
REIT - Healthcare Facilities
REIT - Office
REIT - Industrial

18 	 Industrials
Specialty Industrial Machinery
Aerospace & Defense
Engineering & Construction
Tools & Accessories
Building Products & Equipment
Integrated Freight & Logistics
Railroads
Farm & Heavy Construction Machinery
Industrial Distribution
Trucking
Consulting Services
Rental & Leasing Services
Business Equipment & Supplies
Airlines
Specialty Business Services
Staffing & Employment Services
Waste Management
Security & Protection Services

11 	 Healthcare
Biotechnology
Drug Manufacturers - Specialty & Generic
Medical Instruments & Supplies
Health Information Services
Medical Care Facilities
Drug Manufacturers - General
Medical Distribution
Healthcare Plans
Pharmaceutical Retailers
Medical Devices
Diagnostics & Research

7 	 Basic Materials
Chemicals
Gold
Steel
Agricultural Inputs
Specialty Chemicals
Building Materials
Copper

10 	 Technology
Scientific & Technical Instruments
Semiconductors
Software - Application
Information Technology Services
Computer Hardware
Electronic Components
Communication Equipment
Semiconductor Equipment & Materials
Software - Infrastructure
Consumer Electronics

6 	 Communication Services
Internet Content & Information
Electronic Gaming & Multimedia
Entertainment
Broadcasting
Telecom Services
Advertising Agencies

5 	 Energy
Oil & Gas Midstream
Oil & Gas E&P
Oil & Gas Integrated
Oil & Gas Equipment & Services
Oil & Gas Refining & Marketing

11 	 Consumer Defensive
Grocery Stores
Beverages - Wineries & Distilleries
Farm Products
Beverages - Non-Alcoholic
Food Distribution
Household & Personal Products
Confectioners
Packaged Foods
Beverages - Brewers
Tobacco
Discount Stores

In [83]:
for i in set(companies['Sector']):
    print('\t\t\t', '\033[1m' + i + '\033[0m')
    sector = companies[companies['Sector'] == i]
    for j in set(sector['Industry']):
        print(j)
        industry = sector[sector['Industry'] == j]
        for k in industry.index:
            print(industry.loc[k, 'Ticker'], ':\t', industry.loc[k, 'Company'])
        print()
    print()
			 Utilities
Utilities - Regulated Electric
AEE :	 Ameren Corporation
AEP :	 American Electric Power Company, Inc.
CMS :	 CMS Energy Corporation
DTE :	 DTE Energy Company
DUK :	 Duke Energy Corporation
ED :	 Consolidated Edison, Inc.
EIX :	 Edison International
ES :	 Eversource Energy
EVRG :	 Evergy, Inc.
LNT :	 Alliant Energy Corporation
NEE :	 NextEra Energy, Inc.
PNW :	 Pinnacle West Capital Corporation
PPL :	 PPL Corporation
SO :	 The Southern Company
WEC :	 WEC Energy Group, Inc.
XEL :	 Xcel Energy Inc.

Utilities - Diversified
AES :	 The AES Corporation
D :	 Dominion Energy, Inc.
ETR :	 Entergy Corporation
EXC :	 Exelon Corporation
FE :	 FirstEnergy Corp.
PEG :	 Public Service Enterprise Group Incorporated
SRE :	 Sempra Energy

Utilities - Regulated Gas
ATO :	 Atmos Energy Corporation
CNP :	 CenterPoint Energy, Inc.
NI :	 NiSource Inc.

Utilities - Regulated Water
AWK :	 American Water Works Company, Inc.

Utilities - Independent Power Producers
NRG :	 NRG Energy, Inc.


			 Consumer Cyclical
Travel Services
BKNG :	 Booking Holdings Inc.
CCL :	 Carnival Corporation & Plc
EXPE :	 Expedia Group, Inc.
NCLH :	 Norwegian Cruise Line Holdings Ltd.
RCL :	 Royal Caribbean Cruises Ltd.

Leisure
HAS :	 Hasbro, Inc.

Personal Services
HRB :	 H&R Block, Inc.
ROL :	 Rollins, Inc.

Specialty Retail
AAP :	 Advance Auto Parts, Inc.
AZO :	 AutoZone, Inc.
BBY :	 Best Buy Co., Inc.
GPC :	 Genuine Parts Company
ORLY :	 O'Reilly Automotive, Inc.
TSCO :	 Tractor Supply Company
ULTA :	 Ulta Beauty, Inc.

Internet Retail
AMZN :	 Amazon.com, Inc.
EBAY :	 eBay Inc.

Resorts & Casinos
LVS :	 Las Vegas Sands Corp.
MGM :	 MGM Resorts International
WYNN :	 Wynn Resorts, Limited

Auto Manufacturers
F :	 Ford Motor Company
GM :	 General Motors Company

Apparel Retail
GPS :	 The Gap, Inc.
LB :	 L Brands, Inc.
ROST :	 Ross Stores, Inc.
TJX :	 The TJX Companies, Inc.

Apparel Manufacturing
HBI :	 Hanesbrands Inc.
PVH :	 PVH Corp.
RL :	 Ralph Lauren Corporation
UA :	 Under Armour, Inc.
UAA :	 Under Armour, Inc.
VFC :	 V.F. Corporation

Residential Construction
DHI :	 D.R. Horton, Inc.
LEN :	 Lennar Corporation
NVR :	 NVR, Inc.
PHM :	 PulteGroup, Inc.

Packaging & Containers
AMCR :	 Amcor plc
BLL :	 Ball Corporation
IP :	 International Paper Company
PKG :	 Packaging Corporation of America
SEE :	 Sealed Air Corporation
WRK :	 WestRock Company

Lodging
HLT :	 Hilton Worldwide Holdings Inc.
MAR :	 Marriott International, Inc.

Footwear & Accessories
NKE :	 NIKE, Inc.

Home Improvement Retail
HD :	 The Home Depot, Inc.
LOW :	 Lowe's Companies, Inc.

Luxury Goods
TIF :	 Tiffany & Co.
TPR :	 Tapestry, Inc.

Department Stores
KSS :	 Kohl's Corporation

Auto Parts
APTV :	 Aptiv PLC
BWA :	 BorgWarner Inc.
LKQ :	 LKQ Corporation

Restaurants
CMG :	 Chipotle Mexican Grill, Inc.
DPZ :	 Domino's Pizza, Inc.
DRI :	 Darden Restaurants, Inc.
MCD :	 McDonald's Corporation
SBUX :	 Starbucks Corporation
YUM :	 Yum! Brands, Inc.

Auto & Truck Dealerships
KMX :	 CarMax, Inc.

Furnishings, Fixtures & Appliances
FBHS :	 Fortune Brands Home & Security, Inc.
LEG :	 Leggett & Platt, Incorporated
MHK :	 Mohawk Industries, Inc.
WHR :	 Whirlpool Corporation


			 Financial
Asset Management
AMP :	 Ameriprise Financial, Inc.
BEN :	 Franklin Resources, Inc.
BK :	 The Bank of New York Mellon Corporation
BLK :	 BlackRock, Inc.
IVZ :	 Invesco Ltd.
NTRS :	 Northern Trust Corporation
STT :	 State Street Corporation
TROW :	 T. Rowe Price Group, Inc.

Insurance - Property & Casualty
ALL :	 The Allstate Corporation
CB :	 Chubb Limited
CINF :	 Cincinnati Financial Corporation
L :	 Loews Corporation
PGR :	 The Progressive Corporation
TRV :	 The Travelers Companies, Inc.
WRB :	 W. R. Berkley Corporation

Banks - Regional
CFG :	 Citizens Financial Group, Inc.
CMA :	 Comerica Incorporated
FITB :	 Fifth Third Bancorp
FRC :	 First Republic Bank
HBAN :	 Huntington Bancshares Incorporated
KEY :	 KeyCorp
MTB :	 M&T Bank Corporation
PBCT :	 People's United Financial, Inc.
PNC :	 The PNC Financial Services Group, Inc.
RF :	 Regions Financial Corporation
SIVB :	 SVB Financial Group
TFC :	 Truist Financial Corporation
USB :	 U.S. Bancorp
ZION :	 Zions Bancorporation, National Association

Banks - Diversified
BAC :	 Bank of America Corporation
C :	 Citigroup Inc.
JPM :	 JPMorgan Chase & Co.
WFC :	 Wells Fargo & Company

Insurance Brokers
AJG :	 Arthur J. Gallagher & Co.
AON :	 Aon Plc
MMC :	 Marsh & McLennan Companies, Inc.
WLTW :	 Willis Towers Watson Public Limited Company

Credit Services
AXP :	 American Express Company
COF :	 Capital One Financial Corporation
DFS :	 Discover Financial Services
MA :	 Mastercard Incorporated
PYPL :	 PayPal Holdings, Inc.
SYF :	 Synchrony Financial
V :	 Visa Inc.
WU :	 The Western Union Company

Insurance - Specialty
AIZ :	 Assurant, Inc.

Insurance - Life
AFL :	 Aflac Incorporated
GL :	 Globe Life Inc.
LNC :	 Lincoln National Corporation
MET :	 MetLife, Inc.
PRU :	 Prudential Financial, Inc.
UNM :	 Unum Group

Capital Markets
ETFC :	 E*TRADE Financial Corporation
GS :	 The Goldman Sachs Group, Inc.
MKTX :	 MarketAxess Holdings Inc.
MS :	 Morgan Stanley
RJF :	 Raymond James Financial, Inc.
SCHW :	 The Charles Schwab Corporation

Financial Data & Stock Exchanges
CBOE :	 Cboe Global Markets, Inc.
CME :	 CME Group Inc.
ICE :	 Intercontinental Exchange, Inc.
MCO :	 Moody's Corporation
MSCI :	 MSCI Inc.
NDAQ :	 Nasdaq, Inc.
SPGI :	 S&P Global Inc.

Insurance - Reinsurance
RE :	 Everest Re Group, Ltd.

Insurance - Diversified
AIG :	 American International Group, Inc.
BRK-B :	 Berkshire Hathaway Inc.
HIG :	 The Hartford Financial Services Group, Inc.
PFG :	 Principal Financial Group, Inc.


			 Real Estate
REIT - Residential
AIV :	 Apartment Investment and Management Company
AVB :	 AvalonBay Communities, Inc.
EQR :	 Equity Residential
ESS :	 Essex Property Trust, Inc.
MAA :	 Mid-America Apartment Communities, Inc.
UDR :	 UDR, Inc.

REIT - Retail
FRT :	 Federal Realty Investment Trust
KIM :	 Kimco Realty Corporation
O :	 Realty Income Corporation
REG :	 Regency Centers Corporation
SPG :	 Simon Property Group, Inc.

REIT - Hotel & Motel
HST :	 Host Hotels & Resorts, Inc.

REIT - Specialty
AMT :	 American Tower Corporation (REIT)
CCI :	 Crown Castle International Corp. (REIT)
EQIX :	 Equinix, Inc. (REIT)
IRM :	 Iron Mountain Incorporated
SBAC :	 SBA Communications Corporation (REIT)
WY :	 Weyerhaeuser Company

Real Estate Services
CBRE :	 CBRE Group, Inc.

REIT - Healthcare Facilities
PEAK :	 Healthpeak Properties, Inc.
VTR :	 Ventas, Inc.
WELL :	 Welltower Inc.

REIT - Office
ARE :	 Alexandria Real Estate Equities, Inc.
BXP :	 Boston Properties, Inc.
DLR :	 Digital Realty Trust, Inc.
SLG :	 SL Green Realty Corp.
VNO :	 Vornado Realty Trust

REIT - Industrial
DRE :	 Duke Realty Corporation
EXR :	 Extra Space Storage Inc.
PLD :	 Prologis, Inc.
PSA :	 Public Storage


			 Industrials
Specialty Industrial Machinery
AME :	 AMETEK, Inc.
AOS :	 A. O. Smith Corporation
CMI :	 Cummins Inc.
DOV :	 Dover Corporation
EMR :	 Emerson Electric Co.
ETN :	 Eaton Corporation plc
FLS :	 Flowserve Corporation
GE :	 General Electric Company
HON :	 Honeywell International Inc.
HWM :	 Howmet Aerospace Inc.
IEX :	 IDEX Corporation
IR :	 Ingersoll Rand Inc.
ITW :	 Illinois Tool Works Inc.
MMM :	 3M Company
OTIS :	 Otis Worldwide Corporation
PH :	 Parker-Hannifin Corporation
PNR :	 Pentair plc
ROK :	 Rockwell Automation, Inc.
ROP :	 Roper Technologies, Inc.
TT :	 Trane Technologies plc
XYL :	 Xylem Inc.

Aerospace & Defense
BA :	 The Boeing Company
GD :	 General Dynamics Corporation
HII :	 Huntington Ingalls Industries, Inc.
LHX :	 L3Harris Technologies, Inc.
LMT :	 Lockheed Martin Corporation
NOC :	 Northrop Grumman Corporation
RTX :	 Raytheon Technologies Corporation
TDG :	 TransDigm Group Incorporated
TXT :	 Textron Inc.

Engineering & Construction
J :	 Jacobs Engineering Group Inc.
JCI :	 Johnson Controls International plc
PWR :	 Quanta Services, Inc.

Tools & Accessories
SNA :	 Snap-on Incorporated
SWK :	 Stanley Black & Decker, Inc.

Building Products & Equipment
CARR :	 Carrier Global Corporation
MAS :	 Masco Corporation

Integrated Freight & Logistics
CHRW :	 C.H. Robinson Worldwide, Inc.
EXPD :	 Expeditors International of Washington, Inc.
FDX :	 FedEx Corporation
JBHT :	 J.B. Hunt Transport Services, Inc.
UPS :	 United Parcel Service, Inc.

Railroads
CSX :	 CSX Corporation
KSU :	 Kansas City Southern
NSC :	 Norfolk Southern Corporation
UNP :	 Union Pacific Corporation
WAB :	 Wabtec Corporation

Farm & Heavy Construction Machinery
CAT :	 Caterpillar Inc.
DE :	 Deere & Company
PCAR :	 PACCAR Inc

Industrial Distribution
FAST :	 Fastenal Company
GWW :	 W.W. Grainger, Inc.

Trucking
ODFL :	 Old Dominion Freight Line, Inc.

Consulting Services
EFX :	 Equifax Inc.
INFO :	 IHS Markit Ltd.
NLSN :	 Nielsen Holdings plc
VRSK :	 Verisk Analytics, Inc.

Rental & Leasing Services
URI :	 United Rentals, Inc.

Business Equipment & Supplies
AVY :	 Avery Dennison Corporation

Airlines
AAL :	 American Airlines Group Inc.
ALK :	 Alaska Air Group, Inc.
DAL :	 Delta Air Lines, Inc.
LUV :	 Southwest Airlines Co.
UAL :	 United Airlines Holdings, Inc.

Specialty Business Services
CPRT :	 Copart, Inc.
CTAS :	 Cintas Corporation
GPN :	 Global Payments Inc.

Staffing & Employment Services
ADP :	 Automatic Data Processing, Inc.
PAYX :	 Paychex, Inc.
RHI :	 Robert Half International Inc.

Waste Management
RSG :	 Republic Services, Inc.
WM :	 Waste Management, Inc.

Security & Protection Services
ALLE :	 Allegion plc


			 Healthcare
Biotechnology
ALXN :	 Alexion Pharmaceuticals, Inc.
INCY :	 Incyte Corporation
REGN :	 Regeneron Pharmaceuticals, Inc.
VRTX :	 Vertex Pharmaceuticals Incorporated

Drug Manufacturers - Specialty & Generic
MYL :	 Mylan, Inc.
PRGO :	 Perrigo Company plc
ZTS :	 Zoetis Inc.

Medical Instruments & Supplies
BAX :	 Baxter International Inc.
BDX :	 Becton, Dickinson and Company
COO :	 The Cooper Companies, Inc.
HOLX :	 Hologic, Inc.
ISRG :	 Intuitive Surgical, Inc.
RMD :	 ResMed Inc.
STE :	 STERIS plc
TFX :	 Teleflex Incorporated
VAR :	 Varian Medical Systems, Inc.
WST :	 West Pharmaceutical Services, Inc.
XRAY :	 DENTSPLY SIRONA Inc.

Health Information Services
CERN :	 Cerner Corporation

Medical Care Facilities
DVA :	 DaVita Inc.
HCA :	 HCA Healthcare, Inc.
UHS :	 Universal Health Services, Inc.

Drug Manufacturers - General
ABBV :	 AbbVie Inc.
AMGN :	 Amgen Inc.
BIIB :	 Biogen Inc.
BMY :	 Bristol-Myers Squibb Company
GILD :	 Gilead Sciences, Inc.
JNJ :	 Johnson & Johnson
LLY :	 Eli Lilly and Company
MRK :	 Merck & Co., Inc.
PFE :	 Pfizer Inc.

Medical Distribution
ABC :	 AmerisourceBergen Corporation
CAH :	 Cardinal Health, Inc.
HSIC :	 Henry Schein, Inc.
MCK :	 McKesson Corporation

Healthcare Plans
ANTM :	 Anthem, Inc.
CI :	 Cigna Corporation
CNC :	 Centene Corporation
CVS :	 CVS Health Corporation
HUM :	 Humana Inc.
UNH :	 UnitedHealth Group Incorporated

Pharmaceutical Retailers
WBA :	 Walgreens Boots Alliance, Inc.

Medical Devices
ABMD :	 Abiomed, Inc.
ABT :	 Abbott Laboratories
ALGN :	 Align Technology, Inc.
BIO :	 Bio-Rad Laboratories, Inc.
BSX :	 Boston Scientific Corporation
EW :	 Edwards Lifesciences Corporation
MDT :	 Medtronic plc
SYK :	 Stryker Corporation
ZBH :	 Zimmer Biomet Holdings, Inc.

Diagnostics & Research
A :	 Agilent Technologies, Inc.
DGX :	 Quest Diagnostics Incorporated
DHR :	 Danaher Corporation
DXCM :	 DexCom, Inc.
IDXX :	 IDEXX Laboratories, Inc.
ILMN :	 Illumina, Inc.
IQV :	 IQVIA Holdings Inc.
LH :	 Laboratory Corporation of America Holdings
MTD :	 Mettler-Toledo International Inc.
PKI :	 PerkinElmer, Inc.
TMO :	 Thermo Fisher Scientific Inc.
WAT :	 Waters Corporation


			 Basic Materials
Chemicals
APD :	 Air Products and Chemicals, Inc.
CE :	 Celanese Corporation
DD :	 DuPont de Nemours, Inc.
DOW :	 Dow Inc.
EMN :	 Eastman Chemical Company

Gold
NEM :	 Newmont Corporation

Steel
NUE :	 Nucor Corporation

Agricultural Inputs
CF :	 CF Industries Holdings, Inc.
CTVA :	 Corteva, Inc.
FMC :	 FMC Corporation
MOS :	 The Mosaic Company

Specialty Chemicals
ALB :	 Albemarle Corporation
ECL :	 Ecolab Inc.
IFF :	 International Flavors & Fragrances Inc.
LIN :	 Linde plc
LYB :	 LyondellBasell Industries N.V.
PPG :	 PPG Industries, Inc.
SHW :	 The Sherwin-Williams Company

Building Materials
MLM :	 Martin Marietta Materials, Inc.
VMC :	 Vulcan Materials Company

Copper
FCX :	 Freeport-McMoRan Inc.


			 Technology
Scientific & Technical Instruments
FLIR :	 FLIR Systems, Inc.
FTV :	 Fortive Corporation
GRMN :	 Garmin Ltd.
KEYS :	 Keysight Technologies, Inc.
TDY :	 Teledyne Technologies Incorporated

Semiconductors
ADI :	 Analog Devices, Inc.
AMD :	 Advanced Micro Devices, Inc.
AVGO :	 Broadcom Inc.
INTC :	 Intel Corporation
MCHP :	 Microchip Technology Incorporated
MU :	 Micron Technology, Inc.
MXIM :	 Maxim Integrated Products, Inc.
NVDA :	 NVIDIA Corporation
QCOM :	 QUALCOMM Incorporated
QRVO :	 Qorvo, Inc.
SWKS :	 Skyworks Solutions, Inc.
TXN :	 Texas Instruments Incorporated
XLNX :	 Xilinx, Inc.

Software - Application
ADSK :	 Autodesk, Inc.
ANSS :	 ANSYS, Inc.
CDNS :	 Cadence Design Systems, Inc.
CRM :	 salesforce.com, inc.
CTXS :	 Citrix Systems, Inc.
INTU :	 Intuit Inc.
NOW :	 ServiceNow, Inc.
PAYC :	 Paycom Software, Inc.
TYL :	 Tyler Technologies, Inc.

Information Technology Services
ACN :	 Accenture plc
BR :	 Broadridge Financial Solutions, Inc.
CDW :	 CDW Corporation
CTSH :	 Cognizant Technology Solutions Corporation
DXC :	 DXC Technology Company
FIS :	 Fidelity National Information Services, Inc.
FISV :	 Fiserv, Inc.
FLT :	 FLEETCOR Technologies, Inc.
IBM :	 International Business Machines Corporation
IT :	 Gartner, Inc.
JKHY :	 Jack Henry & Associates, Inc.
LDOS :	 Leidos Holdings, Inc.
XRX :	 Xerox Holdings Corporation

Computer Hardware
ANET :	 Arista Networks, Inc.
HPQ :	 HP Inc.
NTAP :	 NetApp, Inc.
STX :	 Seagate Technology plc
WDC :	 Western Digital Corporation

Electronic Components
APH :	 Amphenol Corporation
GLW :	 Corning Incorporated
TEL :	 TE Connectivity Ltd.

Communication Equipment
CSCO :	 Cisco Systems, Inc.
HPE :	 Hewlett Packard Enterprise Company
JNPR :	 Juniper Networks, Inc.
MSI :	 Motorola Solutions, Inc.
ZBRA :	 Zebra Technologies Corporation

Semiconductor Equipment & Materials
AMAT :	 Applied Materials, Inc.
IPGP :	 IPG Photonics Corporation
KLAC :	 KLA Corporation
LRCX :	 Lam Research Corporation

Software - Infrastructure
ADBE :	 Adobe Inc.
AKAM :	 Akamai Technologies, Inc.
FFIV :	 F5 Networks, Inc.
FTNT :	 Fortinet, Inc.
MSFT :	 Microsoft Corporation
NLOK :	 NortonLifeLock Inc.
ORCL :	 Oracle Corporation
SNPS :	 Synopsys, Inc.
VRSN :	 VeriSign, Inc.

Consumer Electronics
AAPL :	 Apple Inc.


			 Communication Services
Internet Content & Information
FB :	 Facebook, Inc.
GOOG :	 Alphabet Inc.
GOOGL :	 Alphabet Inc.
TWTR :	 Twitter, Inc.

Electronic Gaming & Multimedia
ATVI :	 Activision Blizzard, Inc.
EA :	 Electronic Arts Inc.
TTWO :	 Take-Two Interactive Software, Inc.

Entertainment
CHTR :	 Charter Communications, Inc.
CMCSA :	 Comcast Corporation
DIS :	 The Walt Disney Company
DISCA :	 Discovery, Inc.
DISCK :	 Discovery, Inc.
DISH :	 DISH Network Corporation
LYV :	 Live Nation Entertainment, Inc.
NFLX :	 Netflix, Inc.
VIAC :	 ViacomCBS Inc.

Broadcasting
FOX :	 Fox Corporation
FOXA :	 Fox Corporation
NWS :	 News Corporation
NWSA :	 News Corporation

Telecom Services
CTL :	 CenturyLink, Inc.
T :	 AT&T Inc.
TMUS :	 T-Mobile US, Inc.
VZ :	 Verizon Communications Inc.

Advertising Agencies
IPG :	 The Interpublic Group of Companies, Inc.
OMC :	 Omnicom Group Inc.


			 Energy
Oil & Gas Midstream
KMI :	 Kinder Morgan, Inc.
OKE :	 ONEOK, Inc.
WMB :	 The Williams Companies, Inc.

Oil & Gas E&P
APA :	 Apache Corporation
COG :	 Cabot Oil & Gas Corporation
COP :	 ConocoPhillips
CXO :	 Concho Resources Inc.
DVN :	 Devon Energy Corporation
EOG :	 EOG Resources, Inc.
FANG :	 Diamondback Energy, Inc.
HES :	 Hess Corporation
MRO :	 Marathon Oil Corporation
NBL :	 Noble Energy, Inc.
OXY :	 Occidental Petroleum Corporation
PXD :	 Pioneer Natural Resources Company

Oil & Gas Integrated
CVX :	 Chevron Corporation
XOM :	 Exxon Mobil Corporation

Oil & Gas Equipment & Services
BKR :	 Baker Hughes Company
FTI :	 TechnipFMC plc
HAL :	 Halliburton Company
NOV :	 National Oilwell Varco, Inc.
SLB :	 Schlumberger Limited

Oil & Gas Refining & Marketing
HFC :	 HollyFrontier Corporation
MPC :	 Marathon Petroleum Corporation
PSX :	 Phillips 66
VLO :	 Valero Energy Corporation


			 Consumer Defensive
Grocery Stores
KR :	 The Kroger Co.

Beverages - Wineries & Distilleries
BF-B :	 Brown-Forman Corporation
STZ :	 Constellation Brands, Inc.

Farm Products
ADM :	 Archer-Daniels-Midland Company
TSN :	 Tyson Foods, Inc.

Beverages - Non-Alcoholic
KO :	 The Coca-Cola Company
MNST :	 Monster Beverage Corporation
PEP :	 PepsiCo, Inc.

Food Distribution
SYY :	 Sysco Corporation

Household & Personal Products
CHD :	 Church & Dwight Co., Inc.
CL :	 Colgate-Palmolive Company
CLX :	 The Clorox Company
COTY :	 Coty Inc.
EL :	 The Estee Lauder Companies Inc.
KMB :	 Kimberly-Clark Corporation
NWL :	 Newell Brands Inc.
PG :	 The Procter & Gamble Company

Confectioners
HSY :	 The Hershey Company
MDLZ :	 Mondelez International, Inc.

Packaged Foods
CAG :	 Conagra Brands, Inc.
CPB :	 Campbell Soup Company
GIS :	 General Mills, Inc.
HRL :	 Hormel Foods Corporation
K :	 Kellogg Company
KHC :	 The Kraft Heinz Company
LW :	 Lamb Weston Holdings, Inc.
MKC :	 McCormick & Company, Incorporated
SJM :	 The J. M. Smucker Company

Beverages - Brewers
TAP :	 Molson Coors Beverage Company

Tobacco
MO :	 Altria Group, Inc.
PM :	 Philip Morris International Inc.

Discount Stores
COST :	 Costco Wholesale Corporation
DG :	 Dollar General Corporation
DLTR :	 Dollar Tree, Inc.
TGT :	 Target Corporation
WMT :	 Walmart Inc.


Interactive Candle-Stick Graph

The first thing we tried to do was try to find patterns by looking at the Candle Stick Graph, which ended up taking too much time and couldn't overlay multiple candle-stick graphs on top of each other so we decided to use a line graph for this analysis instead.

Instead if we want to view any single graph we can use the cell two cells down to create an interactive candle-stick graph. This has proved useful in diagnosing problems, like the one we found with CARR, where the ticker only starts after the crash , so we end up lacking data points.

In [86]:
import plotly.graph_objs as go                            # pip install plotly in Anaconda Prompt
def createCandleStick(data):
    plot=[go.Candlestick(x=data.index,
                open=data.Open,
                high=data.High,
                low=data.Low,
                close=data.Close)]
    figSignal = go.Figure(data=plot)
    figSignal.show()
In [87]:
ticker = 'CARR'
createCandleStick(OHLCV[ticker])

Work-Split

Andrew

  • Data Collection
  • Normalization
  • Candle-Stick

Thejus

  • Data trimming
  • Normalization Plus
  • Normalization Visuals

Procedurals

Part 2

The biggest change was moving the data collection, trimming, and saving to a new .ipynb file. This allows all the analysis to be run from top to bottom really easily, and without triggering the Alpha Vantage, which is very time-consuming.

Since normalization was done with all the OHLC data, we wanted to use the candle-sticker graph to display the findings, but the candlestick graph is very hard to over-lay on other graphs, and the plotly library is excruciatingly slow. But the candle-stick graph has proved useful.

In [ ]: